package com.kaifamiao.format;

import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class DateTimeFormatterTest1 {

    public static void main(String[] args) {

        // String pattern = "G yyyy年MM月dd日 EEEE HH:mm:ss.n z";
        String pattern = "G yyyy年MM月dd日 EEEE HH:mm:ss.n";
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern( pattern );

        // ZonedDateTime dt = ZonedDateTime.now();
        LocalDateTime dt = LocalDateTime.now();

        String str = dtf.format( dt );
        System.out.println( str );

    }

}
